package com.demdevdudes.disch.gamestates;

import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Vector3;

public abstract class AbstractGameState implements GameState {

	protected OrthographicCamera camera;
	protected ShapeRenderer shapeRenderer;

	public AbstractGameState(OrthographicCamera camera) {
		this.camera = camera;
		shapeRenderer = new ShapeRenderer();
		shapeRenderer.setProjectionMatrix(this.camera.combined);
	}

	protected Vector3 translateCoordinates(float x, float y) {
		Vector3 screenCoordinates = new Vector3(x, y, 0);
		Vector3 result = camera.unproject(screenCoordinates);
		return result;
	}
}
